package com.sdp.khy.baotou.controller;

import com.sdp.core.bizc.db.Query;
import com.sdp.core.bizc.vo.DataCenter;
import com.sdp.core.bizc.vo.Result;
import com.sdp.khy.baotou.db.khy_user_coupon.entity.KhyUserCoupon;
import com.sdp.khy.baotou.db.khy_user_coupon.service.IKhyUserCouponService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/KhyUserCouponController")
public class KhyUserCouponController {
    @Autowired
    private Query query;

    @Autowired
    private IKhyUserCouponService khyUserCouponService;

    @PostMapping(value = "/page")
    public Result<?> page(@RequestBody DataCenter dataCenter) {
        return Result.ok(query.page(khyUserCouponService, KhyUserCoupon.class, dataCenter));
    }
}
